package com.wymobilearchitecture.demo.log

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.example.w_library.log.WLog
import com.example.w_library.log.base.WLogManager
import com.example.w_library.log.priter.view.WLogViewPrinter
import com.wymobilearchitecture.R

class WLogDemo :AppCompatActivity(){

    var viewPrinter : WLogViewPrinter? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_wlog)

        findViewById<View>(R.id.btn1).setOnClickListener {
            print()
        }

        viewPrinter = WLogViewPrinter(this)
        viewPrinter!!.printerProvider.showFloatingView()
    }

    private fun print(){
        WLogManager.getInstance().addPrinter(viewPrinter)
//        WLog.log(object : WLogConfig(){
//
//            override fun includeTread(): Boolean {
//                return true
//            }
//
//            override fun stackTraceDepth(): Int {
//                return 0
//            }
//        },WLogType.E,"------","5566")

        WLog.a("9900")

    }
}